package cn.iocoder.yudao.framework.qiniu.util;

import com.qiniu.util.Auth;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper
public class QiniuUtil {
    public static QiniuUtil INSTANCE = Mappers.getMapper(QiniuUtil.class);

    public String CreateToken(String accessKey, String secretKey, String bucketName){
        Auth auth = Auth.create(accessKey, secretKey);
        String token = auth.uploadToken(bucketName);
        return token;
    }
}
